﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ReversiBackend
{
    public class EasyAI : AI
    {
        public EasyAI(Game g, int playerIndex, TimerFunc f) : base(g, playerIndex, f)
        {
        }

        public override string Name
        {
            get { return "PC (einfach)"; }
        }

        public override void DoNextMove()
        {
            List<Cell> moves = this.game.Board.GetValidMoves(playerIndex);
            if (moves.Count != 0)
            {
                Random rand = new Random();
                game.Turn(moves[rand.Next(moves.Count)]);
            }
            else
            {
                game.Pass();
            }
        }

        public override void Die()
        {
            
        }
    }
}
